﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net;

namespace Founder.PKURG.LogWorker
{
    public class LogWorker
    {
        public static ILog logger = LogManager.GetLogger("logger");

        public static void InitConfig()
        {
            string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "log4net.config");
            log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(path));
        }

        public static ILog GetLogger(string loggerName)
        {
            ILog logger = LogManager.GetLogger(loggerName);
            return logger;
        }
    }
}
